﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Winz.JsonModel;

namespace Winz.FoeBot
{
    public class MessageEventArgs<T> : EventArgs
    {
        public MessageEventArgs(T message)
        {
            Message = message;
        }

        public T Message
        {
            get;
            private set;
        }
    }
    public delegate void PlayerNeedMotivationOrderEventHandler(object sender, MessageEventArgs<OtherPlayeCity> e);

    public delegate void UnableToMotivateEventHandler(object sender, MessageEventArgs<OtherPlayer> e);
    public delegate void BotStartedEventHandler(object sender, EventArgs e);
    public delegate void BotStoppedEventHandler(object sender, EventArgs e);
    public delegate void BotPausedEventHandler(object sender, EventArgs e);


    public delegate void TradeOffersRecievedEventHandler(object sender, MessageEventArgs<List<TradeOffer>> e);
    public delegate void ResearchRecievedEventHandler(object sender, MessageEventArgs<List<Research>> e);
    public delegate void EventsRecievedEventHandler(object sender, MessageEventArgs<List<Interaction>> e);
    public delegate void PlayerVisitedEventHandler(object sender, MessageEventArgs<OtherPlayeCity> e);
    public delegate void PlayerMotivatedEventHandler(object sender, MessageEventArgs<OtherPlayer> e);

    public delegate void GameStartedEventHandler(object sender, MessageEventArgs<StartUp> e);
    public delegate void PlayerListRecievedEventHandler(object sender, MessageEventArgs<List<OtherPlayer>> e);


    public delegate void BluePrintFoundEventHandler(object sender, BluePrintFoundEventArgs e);
    public class BluePrintFoundEventArgs : EventArgs
    {
        private readonly OtherPlayer player;
        private readonly GreatBuildingBlueprintFound bpFound;

        public BluePrintFoundEventArgs(OtherPlayer player, GreatBuildingBlueprintFound bpFound)
        {
            this.player = player;
            this.bpFound = bpFound;
        }

        public OtherPlayer Player
        {
            get { return player; }
        }
        public GreatBuildingBlueprintFound BpFound
        {
            get { return bpFound; }
        }

    }
}
